package com.szzg10.webservice.chapter1;

import java.util.List;

import com.szzg10.webservice.chapter1.wsimport.Team;
import com.szzg10.webservice.chapter1.wsimport.Teams;
import com.szzg10.webservice.chapter1.wsimport.TeamsService;
import com.szzg10.webservice.chapter1.wsimport.Player;

public class TeamsClient {

	public static void main(String[] args) {
		
		TeamsService teamsService = new TeamsService();
		Teams teams = teamsService.getTeamsPort();
		
		List<Team> listTeam = teams.getTeams();
		for(Team team: listTeam) {
			System.out.println("------------------------------------------------------------------------");
			System.out.println(team.getName());
			for(Player player: team.getPlayers()) {
				System.out.println(player.getName());
			}
		}
	}
}
